from rest_framework.serializers import ModelSerializer
from .models import *
from rest_framework import serializers

class Cffser(ModelSerializer):
    class Meta:
        model=Cff
        fields='__all__'

class Tjser(ModelSerializer):
    class Meta:
        model=Tj
        fields='__all__'

class Userser(ModelSerializer):
    class Meta:
        model=User
        fields='__all__'

class Areaser(ModelSerializer):
    class Meta:
        model=Area
        fields='__all__'
class Addressser(ModelSerializer):
    class Meta:
        model=Address
        fields='__all__'

class sAddressser(ModelSerializer):
    user=serializers.StringRelatedField()
    province=serializers.StringRelatedField()
    city=serializers.StringRelatedField()
    area=serializers.StringRelatedField()
    class Meta:
        model=Address
        fields='__all__'